Skip to content

[#7107] Preserve damage part options through roll construction#7105

Open
thatlonelybugbear wants to merge 2 commits into
foundryvtt:6.0.xfrom
thatlonelybugbear:feature/damage-part-options
Open

[#7107] Preserve damage part options through roll construction#7105
thatlonelybugbear wants to merge 2 commits into
foundryvtt:6.0.xfrom
thatlonelybugbear:feature/damage-part-options

Conversation

@thatlonelybugbear

@thatlonelybugbear thatlonelybugbear commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Closes #7107

Adds support for preserving options from configured damage parts through normal damage roll construction, and ensures evaluation options stored on the resulting DamageRoll are respected.

Changes:

  • Adds an options field to DamageData.
  • Passes damage part options into generated damage roll configs.
  • Allows DamageRoll to consume roll-level maximize and minimize options during evaluate() / evaluateSync().
  • Allows configured damage parts to carry existing per-roll critical options such as critical.allow: false

Clarifications:

  • Lower-level roll configs could already carry critical.allow: false when injected directly into config.rolls.
  • This lays the groundwork for system-owned damage bonus data to carry roll options, such as a future system.bonuses.damage.mwak damage part that can declare critical.allow: false without a need of constructing a lower-level config.rolls entry directly.

Example of functionality

Hooks.once('dnd5e.preRollDamage', (config, dialog, message) => {
	config.rolls ??= [];

	config.rolls.push({
		parts: ['1d8'],
		data: {},
		options: {
			types: ['necrotic'],
			type: 'necrotic',
			minimize: true,
			critical: { allow: false },
		},
	});
});
image

Should be introducing the framework for potentially closing #7047 when the rules aware AEs are introduced.

@thatlonelybugbear thatlonelybugbear changed the title Support per damage part options Preserve damage part options through roll construction Jun 11, 2026
@thatlonelybugbear thatlonelybugbear changed the title Preserve damage part options through roll construction [#7107] Preserve damage part options through roll construction Jun 11, 2026
@Fyorl Fyorl added api system: dice Dice rolling functionality strategic Requires sign-off from a core Foundry VTT developer before merge. priority: low labels Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api priority: low strategic Requires sign-off from a core Foundry VTT developer before merge. system: dice Dice rolling functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose and respect first-class damage part roll options

2 participants